﻿using System;
using System.Configuration;
using System.Reflection;
using Migrator.Framework;
using Migrator.Providers.SqlServer;

namespace BookTheBook.Migrations.Runner
{
    class Program
    {
        static void Main()
        {
            string connectionString = ConfigurationManager.ConnectionStrings["MigrationsConnectionString"].ToString();

            ITransformationProvider provider = new SqlServerTransformationProvider(new SqlServer2005Dialect(), connectionString);

            Migrator.Migrator migrator = new Migrator.Migrator(provider, Assembly.GetAssembly(typeof(MigratorHookUp)), false);
            migrator.MigrateToLastVersion();
            
            Console.ReadKey();
        }
    }
}
